
const mysql = require("mysql2")
const neo4j = require("neo4j-driver")

/**
 * @Description: 创建mysql数据库连接
 * @author zhaojiuyi
 * @date 2023/4/8
 */
const createMysqlConnection = () => mysql.createConnection({
    host: "43.136.169.74",
    user: "books",
    password: "fy7777777",
    database: "books_recommend"
})

/**
 * @Description: 创建neo4j连接
 * @author zhaojiuyi
 * @date 2023/4/8
*/
const createNeo4jDriver = () => neo4j.driver(
    "bolt://localhost:7687/",
    neo4j.auth.basic("neo4j",'fy7777777')
)
module.exports = {
    createMysqlConnection,
    createNeo4jDriver
}


